package org.agile2soft.nexoma.tapestry.encoder;

import org.agile2soft.nexoma.controller.DocumentController;
import org.agile2soft.nexoma.entity.Document;
import org.hibernate.SessionFactory;

import br.com.arsmachina.tapestrycrud.hibernate.encoder.HibernateIntegerEncoder;

public class DocumentEncoder extends HibernateIntegerEncoder<Document> {

    public DocumentEncoder(SessionFactory sessionFactory,
            DocumentController controller) {
        super(sessionFactory, controller);
    }

//    public DocumentEncoder(SessionFactory sessionFactory,
//            DocumentController controller,
//            PrimaryKeyTypeService primaryKeyTypeService) {
//        super(sessionFactory, controller,primaryKeyTypeService);
//    }

    public String toLabel(Document document) {
        return document.getName();
    }

}
